package com.woniuxy.controller;


import com.woniuxy.demo.Result;
import com.woniuxy.dto.WarehouseDto;
import com.woniuxy.dto.WarehouseShopDto;
import com.woniuxy.param.ListWareHouseParam;
import com.woniuxy.service.WarehouseShopService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 仓库关联表 前端控制器
 * </p>
 *
 * @author zcx,ftl,gr,rhs
 * @since 2021-12-31
 */
@RestController
@RequestMapping("/warehouse-shop")
@Api(tags = "门店仓库中间接口")
public class WarehouseShopController {
    @Autowired
    private WarehouseShopService warehouseShopService;

    /**
     * 门店查仓库
     * @param ShopId
     * @return
     */
    @ApiOperation("门店查仓库")
    @GetMapping("/listWareHouseByShopId/{ShopId}")
    public Result listWareHouseByShopId(@PathVariable Integer ShopId){
        List<WarehouseShopDto> warehouseDtos = warehouseShopService.listWareHouseByShopId(ShopId);
            return Result.newInstance().setCode(200).setMsg("查询成功").setData(warehouseDtos);
    }
}

